//
//  AFAppDotNetAPIClient.h
//
//  Created by Liulingbo on 15/4/15.
//  Copyright (c) 2015年 Liulingbo. All rights reserved.
//  Descpriton:封装的网络请求。

#import <AFNetworking/AFHTTPSessionManager.h>

typedef void (^HTTPRequestFinishingHandler)(NSDictionary *result, NSError *error);

typedef void (^HTTPRequestFailedHandler)(NSError *error);

@interface AFAppDotNetAPIClient : AFHTTPSessionManager

//封装的get请求
+ (void)getAsynchronous:(NSString *)path
              parameter:(NSDictionary *)dic
           successBlock:(HTTPRequestFinishingHandler)successBlock
             errorBlock:(HTTPRequestFailedHandler) errorBlock;

//封装的post请求
+ (void)postAsynchronous:(NSString *)path
               parameter:(id)dic
                   successBlock:(HTTPRequestFinishingHandler)successBlock
              errorBlock:(HTTPRequestFailedHandler) errorBlock;
//封装的put请求
+ (void)putAsynchronous:(NSString *)path
               parameter:(id)dic
            successBlock:(HTTPRequestFinishingHandler)successBlock
              errorBlock:(HTTPRequestFailedHandler) errorBlock;


@end
